package com.zh.mybatis.domain.book;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zh.mybatis.domain.book.entity.Book;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * @author ZH
 * @date 20:47 2021/11/16
 */
@Mapper
public interface BookRepository extends BaseMapper<Book> {

    @Update("update welfare_card_expired_time set no_list=json_array_append(no_list, '$', #{member_id}) WHERE id=#{key}")
    int appendValue(@Param("member_id") String member_id,@Param("key") String dateKey);

}
